<!DOCTYPE html>
<script type="text/javascript">
var ws = new WebSocket("ws://localhost:19001")

ws.onopen = function() {
     ws.send(JSON.stringify({"id":"Login","body":"{\"type\":1,\"userid\":\"\",\"account\":\"\",\"phone\":18664324257,\"email\":\"4469684514@qq.com\",\"passwd\":\"ys6303618\"}"}))
};
ws.onmessage = function (evt)
{
    var result = evt.data;
    alert(result);
};

ws.onclose = function()
{
    // 关闭 websocket
    alert("closed");
};
</script>
</html>K